<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: ACER
  Date: 2017/6/13
  Time: 9:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title></title>
</head>
<body style="background: rgba(180, 248, 128, 0.77)">
<jsp:include page="/index.jsp"></jsp:include>

<table align="center" style="font-size: 25px" border="1px" width="70%">

    <tr>

        <th>学号</th>
        <th>姓名</th>
        <th>系别</th>
        <th>所选课程</th>
        <th>课程学分</th>
        <th>成绩</th>
    </tr>

    <c:forEach items="${studentCourseList}" var="sc">

        <tr align="center">
            <td>${sc.student.studentNo}</td>

            <td>${sc.student.studentName}</td>

            <td>${sc.student.studentDept}</td>


                <%--<td>${sc.courseName}</td>--%>

            <c:forEach items="${sc.courseList}" var="course">

                <td>${course.courseName}</td>
                <td>${course.courseCredit}</td>
            </c:forEach>

            <td>${sc.grade}</td>
            <td>
                <a href="${pageContext.request.contextPath}/sc/update?id=${sc.scId}">更新成绩</a></td>
        </tr>

    </c:forEach>

    <br/>
    <br/>
    <br/>
    <br/>
<tr>

        <c:if test="${studentCourseList==null}">
            <td colspan="6" align="center">
            <h1>当前学生还没有选修课程</h1>
            </td>
        </c:if>

</tr>
</table>
</body>
</html>
